@import "../../consts.scss";

$smallSize: 24px;
$middleSize: 36px;

.dtTreeWrapper {
    background-color: $white;
    &-icon {
        &__unfold {
            font-size: $font20;
            color: $navy4;
        }
        &__search {
            margin-left: 12px;
            font-size: $font14;
            color: $navy4;
        }
        &__close {
            margin-left: 12px;
            font-size: $font14;
            color: $navy4;
        }
    }
    &__search {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 12px;
    }
    .ant-tree {
        .ant-tree-node-content-wrapper.ant-tree-node-selected {
            background-color: transparent;
        }
        &-list {
            margin-top: 8px;
        }
        &-treenode {
            width: 100%;
            padding: 0 12px;
            align-items: center;
            .ant-tree-node-content-wrapper {
                width: 100%;
                padding: 0;
                // TODO 会导致拖拽时遮挡
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                &:hover {
                    background-color: transparent;
                    .ant-tree-switcher {
                        background-color: $navy7;
                    }
                }
            }
            .ant-tree-switcher {
                background: none;
            }
            &-selected {
                position: relative;
                background-color: $bg1;
                &::before {
                    content: "";
                    position: absolute;
                    left: 0;
                    width: 4px;
                    height: $smallSize;
                    background-color: $primary;
                }
            }
            &:hover {
                background-color: $navy7;
            }
        }
    }
    .ant-tabs {
        padding: 0 12px;
        &-nav {
            margin-bottom: 0;
        }
    }
    &-small {
        font-size: $font14;
        .ant-tree {
            &-treenode {
                .ant-tree-switcher {
                    width: $smallSize;
                    line-height: $smallSize;
                }
                &-selected {
                    &::before {
                        height: $smallSize;
                    }
                }
            }
        }
    }
    &-middle {
        font-size: $font16;
        .ant-tree {
            &-treenode {
                .ant-tree-switcher {
                    // width: $middleSize;
                    line-height: $middleSize;
                }
                .ant-tree-node-content-wrapper {
                    min-height: $middleSize;
                    line-height: $middleSize;
                    .ant-tree-iconEle {
                        // width: $middleSize;
                        height: $middleSize;
                        line-height: $middleSize;
                        .anticon {
                            vertical-align: middle;
                            svg {
                                font-size: 18px;
                            }
                        }
                    }
                }
                &-selected {
                    &::before {
                        height: $middleSize;
                    }
                }
            }
        }
    }
}
